<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Capture/Bubble</title>

    <script type="text/javascript">
    //<![CDATA[
    
    window.onload = setObjects;

    function setObjects() {
        document.getElementById("personData").lastName.focus();
    }

    //]]>
    </script>

</head>


<body>
    <form id="personData" action="">
        <p>
            First Name: <input type="text" name="firstName"/> <br /> <br />
            Last Name: <input type="text" name="lastName" />
        </p>
    </form>
</body>
</html>